<?php
function smarty_insert_getusername($param, &$smarty) {

	if ($_SESSION['union_username']=='') {
		$string="<form method=\"post\" id=\"form1\" action=\"https://passport.9wee.com/login\" onsubmit='javascript: return checklogininfo();'>
					<ul>
						<li>会员登录:</li>
						<li>用户名:</li>
						<li><input type=\"text\" class=\"header_input\" name=\"username\"  style=\"width:106px; height:14px;\" /></li>
						<li>密 码:<input id='_REFERER' type='hidden' name='_REFERER' value='http://".$param['url']."/passport_index.php'></li>
						<li><input type=\"password\" class=\"header_input\" name=\"password\" style=\"width:106px; height:14px;\" /></li>
						<li class=\"c\"><input type=\"image\" src=\"../images/9wee_login.gif\"></li>
						<li><a href=\"../register.php\">用户注册</a>|<a href=\"https://passport.9wee.com/getpsw?from=gameunion\" target='_blank'>忘记密码</a></li>
					</ul></form>";
	} else {
		$string="<div align=\"right\">欢迎您回来，".$_SESSION['union_username']."&nbsp;&nbsp;&nbsp;<a href=\"../logout.php?url=http://".$param['url']."\">注销</a></div>";
					
	}
	return "<div class=\"header_login\">".$string."</div>";


 }
?>
